const errType = {
  0: 'ok',
  1: '未登录',
  2: '参数错误'
}

export function getResponse(type = 0, data = '') {
  let mes = errType[type];
  return {
    code: type,
    message: mes,
    data: data
  };
};

export function getResponseData(data) {
  return {
    code: 0,
    message: errType[0],
    data: data
  };
};
